// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

#ifndef LIBGO_GO_PANIC_H
#define LIBGO_GO_PANIC_H

struct __go_string;
struct __go_type_descriptor;
struct __go_defer_stack;

extern void __go_panic(struct __go_empty_interface) __attribute__ ((noreturn));
extern _Bool __go_can_recover(const void *retaddr);
extern struct __go_empty_interface __go_recover(void);
extern struct __go_empty_interface __go_deferred_recover(void);

// C called.

bool runtime_panicking(void);

void runtime_panicstring(const char *s) __attribute__ ((noreturn));
void runtime_throw(const char *s) __attribute__ ((noreturn));

#endif /* !defined(LIBGO_GO_PANIC_H) */
